feat(tools/looker): Looker agent management from MCP#2830
feat(tools/looker): Looker agent management from MCP#2830drstrangelooker merged 30 commits intomainfrom
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request integrates a new tool into the system that allows for the programmatic management of Looker Agents. This enhancement provides LLMs with direct capabilities to interact with Looker Agent resources, streamlining automation and extending the platform's reach into Looker's agent ecosystem. The changes include the core implementation of the tool, its registration within the command-line interface, and comprehensive user documentation. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
|
@hiracky16 lets continue from here so that all the tests run properly. |
|
Do you want this to be in a prebuilt tool set? Also we should have some integration tests in |
There was a problem hiding this comment.
Code Review
This pull request introduces a new looker-agent tool, enabling LLMs to perform CRUD operations (list, get, create, delete) on Looker agents. The changes include the tool's core implementation, registration, documentation, and unit tests. Feedback from the review suggests adhering to naming conventions for tool names as per the style guide, utilizing NewStringParameterWithAllowedValues for more robust parameter validation, and dynamically referencing the tool's name in debug logs for improved maintainability.
|
@hiracky16 I didn't realise you weren't a googler. You may not be able to commit to this branch. If you fork this branch and the set PRs against it I'll merge them in. |
|
@drstrangelooker Thank you for the suggestion. I've significantly expanded the description field in the documentation to include detailed instructions for LLMs, explaining each operation and its required parameters. This should make it much easier for agents to use the tool correctly. |
## Description Addresses the feedback from the maintainers regarding the `looker-agent` tool.
1 similar comment
…r for agent tool (#2864) ## Description This PR significantly enhances the `looker-agent` tool by adding missing parameters required for effective agent management. In the initial implementation, only `name` and `description` (internal) were supported. However, crucial fields for Looker AI Agents such as `instructions` (system prompt), `sources` (data models/explores), and `code_interpreter` were missing. This update fills those gaps and also introduces an update operation. ## Changes - New Parameters: Added `instructions`, `sources` (JSON-encoded array), and `code_interpreter` (boolean) to both `create` and `update` operations. - Update Operation: Implemented the `update` operation to allow modification of existing agents. - Robustness: - Updated error handling to use `http.StatusBadRequest` for client-side validation errors. - Added safety checks for parameter access to prevent runtime panics. - Enhanced Testing: Rewrote and expanded unit tests to cover all new parameters, operations, and validation logic (including MCP manifest verification). - Documentation: Updated the tool's documentation with detailed LLM instructions and usage examples for all new fields. ## Impact The `looker-agent` tool is now fully capable of managing the complete lifecycle and configuration of Looker AI Agents, enabling sophisticated analytical workflows. ## Verification - Comprehensive unit tests added and passed: go test -v ./internal/tools/looker/lookeragent/... - Verified MCP manifest generation and schema correctness.
|
@drstrangelooker Please let me know if there's anything else needed to merge #2830! I'm happy to make further adjustments as required. |
…nality (#2887) …ort agent instructions/update ## Description This PR addresses CI failures observed in #2830 and enhances the `looker-agent` tool with missing functionality and improved robustness. Based on the CI results in #2830, I have fixed the linting issues and the documentation build error. I have also taken this opportunity to implement essential missing features such as agent instructions and update operations. ## PR Checklist > Thank you for opening a Pull Request! Before submitting your PR, there are a > few things you can do to make sure it goes smoothly: - [ ] Make sure you reviewed [CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md) - [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/genai-toolbox/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) - [ ] Make sure to add `!` if this involve a breaking change 🛠️ Fixes #<issue_number_goes_here> --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
#2967) ## Description This PR addresses the security and safety concerns raised in #2830 regarding critical annotations in Looker agent tools. ### Changes - **Annotation Protection**: Hardcoded `readOnlyHint` and `destructiveHint` in the `Initialize` method for the following tools to ensure they cannot be overridden by user configuration: - `create_agent` (readOnly: false) - `update_agent` (readOnly: false) - `delete_agent` (readOnly: false, destructive: true) - `get_agent` (readOnly: true) - `list_agents` (readOnly: true) - **Verification Tests**: Added `TestAnnotations` to each tool's test suite to verify that these hints are strictly enforced even when a user attempts to override them in the configuration. - **Go Environment Consistency**: Kept the Go version at `1.25.7` to match the current `main` branch state while ensuring no unwanted toolchain updates were introduced. ## Verification Results Ran unit tests for all 5 tools and confirmed that all tests, including the new annotation enforcement checks, passed successfully.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a suite of Looker Conversation Analytics tools, including functionality to create, delete, get, list, and update agents. Each tool is implemented with its own configuration, logic, and unit tests, and corresponding documentation has been added. The review feedback identifies several violations of the repository style guide regarding documentation titles and a typo in the update agent documentation.
minor documentation nits Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
dcab1ba to
5b50f4e
Compare
5b50f4e to
1890701
Compare
|
🧨 Preview deployments removed. Cloudflare Pages environments for |
## Description Looker agent management from MCP ## PR Checklist > Thank you for opening a Pull Request! Before submitting your PR, there are a > few things you can do to make sure it goes smoothly: - [x] Make sure you reviewed [CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md) - [x] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/genai-toolbox/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [x] Ensure the tests and linter pass - [x] Code coverage does not decrease (if any source code was changed) - [x] Appropriate docs were updated (if necessary) - [x] Make sure to add `!` if this involve a breaking change 🛠️ Fixes #2827 --------- Co-authored-by: hiracky16 <h.piiice16@gmail.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> 649d4ad
…pis#2830) ## Description Looker agent management from MCP ## PR Checklist > Thank you for opening a Pull Request! Before submitting your PR, there are a > few things you can do to make sure it goes smoothly: - [x] Make sure you reviewed [CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md) - [x] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/genai-toolbox/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [x] Ensure the tests and linter pass - [x] Code coverage does not decrease (if any source code was changed) - [x] Appropriate docs were updated (if necessary) - [x] Make sure to add `!` if this involve a breaking change 🛠️ Fixes googleapis#2827 --------- Co-authored-by: hiracky16 <h.piiice16@gmail.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> 649d4ad
🤖 I have created a release *beep* *boop* --- ## [0.32.0](v0.31.0...v0.32.0) (2026-04-08) ### ⚠ BREAKING CHANGES * update repo name ([#2968](#2968)) ### Features * Add MCP tool annotations to all remaining tools ([#2221](#2221)) ([ea09db9](ea09db9)) * **bigquery:** Add conversational analytics tools for Data Agents ([#2517](#2517)) ([2490a4b](2490a4b)) * **embeddingModel:** Add Backend API selection fields ([#2592](#2592)) ([912aa9e](912aa9e)) * **skills:** Add Claude Code support to generated scripts ([#2966](#2966)) ([a1609e1](a1609e1)) * **skills:** Add codex user agent ([#2973](#2973)) ([070e939](070e939)) * **skills:** Tool invocation via npx ([#2916](#2916)) ([377dc5b](377dc5b)) * **sources/singlestore:** Add ConnectionParams to SingleStore Config ([#2555](#2555)) ([73e2a8c](73e2a8c)) * **tool/dataplex-lookup-context:** Relax project constraint and enforce location ([#2952](#2952)) ([7ebfdf1](7ebfdf1)) * **tools/looker:** Looker agent management from MCP ([#2830](#2830)) ([649d4ad](649d4ad)) * **ui:** Update to use `/mcp` endpoint ([#2829](#2829)) ([c3059c2](c3059c2)) ### Bug Fixes * **bigquery:** Add impersonateServiceAccount to prebuilt config ([#2770](#2770)) ([9c3a748](9c3a748)) * **quickstart:** Robust tool lookup and modernize dependencies in Python samples ([#2863](#2863)) ([4c0845d](4c0845d)) * **skills:** Fix skill generation template ([#2914](#2914)) ([a01a15e](a01a15e)) * **skills:** Prevent empty strings overriding optional env vars in node scripts ([#2963](#2963)) ([c52adeb](c52adeb)) * **tests/bigquery:** Implement uuid-based isolation and reliable resource cleanup ([#2547](#2547)) ([479d842](479d842)) * **tests/Bigtable:** Implement uuid-based isolation and reliable resource cleanup ([#2880](#2880)) ([a769f15](a769f15)) * Update error for ConvertConfig function ([#2993](#2993)) ([62bdabb](62bdabb)) ### Code Refactoring * Update repo name ([#2968](#2968)) ([3aae809](3aae809)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com>
🤖 I have created a release *beep* *boop* --- ## [0.32.0](v0.31.0...v0.32.0) (2026-04-08) ### ⚠ BREAKING CHANGES * update repo name ([#2968](#2968)) ### Features * Add MCP tool annotations to all remaining tools ([#2221](#2221)) ([ea09db9](ea09db9)) * **bigquery:** Add conversational analytics tools for Data Agents ([#2517](#2517)) ([2490a4b](2490a4b)) * **embeddingModel:** Add Backend API selection fields ([#2592](#2592)) ([912aa9e](912aa9e)) * **skills:** Add Claude Code support to generated scripts ([#2966](#2966)) ([a1609e1](a1609e1)) * **skills:** Add codex user agent ([#2973](#2973)) ([070e939](070e939)) * **skills:** Tool invocation via npx ([#2916](#2916)) ([377dc5b](377dc5b)) * **sources/singlestore:** Add ConnectionParams to SingleStore Config ([#2555](#2555)) ([73e2a8c](73e2a8c)) * **tool/dataplex-lookup-context:** Relax project constraint and enforce location ([#2952](#2952)) ([7ebfdf1](7ebfdf1)) * **tools/looker:** Looker agent management from MCP ([#2830](#2830)) ([649d4ad](649d4ad)) * **ui:** Update to use `/mcp` endpoint ([#2829](#2829)) ([c3059c2](c3059c2)) ### Bug Fixes * **bigquery:** Add impersonateServiceAccount to prebuilt config ([#2770](#2770)) ([9c3a748](9c3a748)) * **quickstart:** Robust tool lookup and modernize dependencies in Python samples ([#2863](#2863)) ([4c0845d](4c0845d)) * **skills:** Fix skill generation template ([#2914](#2914)) ([a01a15e](a01a15e)) * **skills:** Prevent empty strings overriding optional env vars in node scripts ([#2963](#2963)) ([c52adeb](c52adeb)) * **tests/bigquery:** Implement uuid-based isolation and reliable resource cleanup ([#2547](#2547)) ([479d842](479d842)) * **tests/Bigtable:** Implement uuid-based isolation and reliable resource cleanup ([#2880](#2880)) ([a769f15](a769f15)) * Update error for ConvertConfig function ([#2993](#2993)) ([62bdabb](62bdabb)) ### Code Refactoring * Update repo name ([#2968](#2968)) ([3aae809](3aae809)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com> b9ae1c6
🤖 I have created a release *beep* *boop* --- ## [0.32.0](googleapis/mcp-toolbox@v0.31.0...v0.32.0) (2026-04-08) ### ⚠ BREAKING CHANGES * update repo name ([googleapis#2968](googleapis#2968)) ### Features * Add MCP tool annotations to all remaining tools ([googleapis#2221](googleapis#2221)) ([ea09db9](googleapis@ea09db9)) * **bigquery:** Add conversational analytics tools for Data Agents ([googleapis#2517](googleapis#2517)) ([2490a4b](googleapis@2490a4b)) * **embeddingModel:** Add Backend API selection fields ([googleapis#2592](googleapis#2592)) ([912aa9e](googleapis@912aa9e)) * **skills:** Add Claude Code support to generated scripts ([googleapis#2966](googleapis#2966)) ([a1609e1](googleapis@a1609e1)) * **skills:** Add codex user agent ([googleapis#2973](googleapis#2973)) ([070e939](googleapis@070e939)) * **skills:** Tool invocation via npx ([googleapis#2916](googleapis#2916)) ([377dc5b](googleapis@377dc5b)) * **sources/singlestore:** Add ConnectionParams to SingleStore Config ([googleapis#2555](googleapis#2555)) ([73e2a8c](googleapis@73e2a8c)) * **tool/dataplex-lookup-context:** Relax project constraint and enforce location ([googleapis#2952](googleapis#2952)) ([7ebfdf1](googleapis@7ebfdf1)) * **tools/looker:** Looker agent management from MCP ([googleapis#2830](googleapis#2830)) ([649d4ad](googleapis@649d4ad)) * **ui:** Update to use `/mcp` endpoint ([googleapis#2829](googleapis#2829)) ([c3059c2](googleapis@c3059c2)) ### Bug Fixes * **bigquery:** Add impersonateServiceAccount to prebuilt config ([googleapis#2770](googleapis#2770)) ([9c3a748](googleapis@9c3a748)) * **quickstart:** Robust tool lookup and modernize dependencies in Python samples ([googleapis#2863](googleapis#2863)) ([4c0845d](googleapis@4c0845d)) * **skills:** Fix skill generation template ([googleapis#2914](googleapis#2914)) ([a01a15e](googleapis@a01a15e)) * **skills:** Prevent empty strings overriding optional env vars in node scripts ([googleapis#2963](googleapis#2963)) ([c52adeb](googleapis@c52adeb)) * **tests/bigquery:** Implement uuid-based isolation and reliable resource cleanup ([googleapis#2547](googleapis#2547)) ([479d842](googleapis@479d842)) * **tests/Bigtable:** Implement uuid-based isolation and reliable resource cleanup ([googleapis#2880](googleapis#2880)) ([a769f15](googleapis@a769f15)) * Update error for ConvertConfig function ([googleapis#2993](googleapis#2993)) ([62bdabb](googleapis@62bdabb)) ### Code Refactoring * Update repo name ([googleapis#2968](googleapis#2968)) ([3aae809](googleapis@3aae809)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com> b9ae1c6
🤖 I have created a release *beep* *boop* --- ## [0.32.0](googleapis/mcp-toolbox@v0.31.0...v0.32.0) (2026-04-08) ### ⚠ BREAKING CHANGES * update repo name ([googleapis#2968](googleapis#2968)) ### Features * Add MCP tool annotations to all remaining tools ([googleapis#2221](googleapis#2221)) ([ea09db9](googleapis@ea09db9)) * **bigquery:** Add conversational analytics tools for Data Agents ([googleapis#2517](googleapis#2517)) ([2490a4b](googleapis@2490a4b)) * **embeddingModel:** Add Backend API selection fields ([googleapis#2592](googleapis#2592)) ([912aa9e](googleapis@912aa9e)) * **skills:** Add Claude Code support to generated scripts ([googleapis#2966](googleapis#2966)) ([a1609e1](googleapis@a1609e1)) * **skills:** Add codex user agent ([googleapis#2973](googleapis#2973)) ([070e939](googleapis@070e939)) * **skills:** Tool invocation via npx ([googleapis#2916](googleapis#2916)) ([377dc5b](googleapis@377dc5b)) * **sources/singlestore:** Add ConnectionParams to SingleStore Config ([googleapis#2555](googleapis#2555)) ([73e2a8c](googleapis@73e2a8c)) * **tool/dataplex-lookup-context:** Relax project constraint and enforce location ([googleapis#2952](googleapis#2952)) ([7ebfdf1](googleapis@7ebfdf1)) * **tools/looker:** Looker agent management from MCP ([googleapis#2830](googleapis#2830)) ([649d4ad](googleapis@649d4ad)) * **ui:** Update to use `/mcp` endpoint ([googleapis#2829](googleapis#2829)) ([c3059c2](googleapis@c3059c2)) ### Bug Fixes * **bigquery:** Add impersonateServiceAccount to prebuilt config ([googleapis#2770](googleapis#2770)) ([9c3a748](googleapis@9c3a748)) * **quickstart:** Robust tool lookup and modernize dependencies in Python samples ([googleapis#2863](googleapis#2863)) ([4c0845d](googleapis@4c0845d)) * **skills:** Fix skill generation template ([googleapis#2914](googleapis#2914)) ([a01a15e](googleapis@a01a15e)) * **skills:** Prevent empty strings overriding optional env vars in node scripts ([googleapis#2963](googleapis#2963)) ([c52adeb](googleapis@c52adeb)) * **tests/bigquery:** Implement uuid-based isolation and reliable resource cleanup ([googleapis#2547](googleapis#2547)) ([479d842](googleapis@479d842)) * **tests/Bigtable:** Implement uuid-based isolation and reliable resource cleanup ([googleapis#2880](googleapis#2880)) ([a769f15](googleapis@a769f15)) * Update error for ConvertConfig function ([googleapis#2993](googleapis#2993)) ([62bdabb](googleapis@62bdabb)) ### Code Refactoring * Update repo name ([googleapis#2968](googleapis#2968)) ([3aae809](googleapis@3aae809)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com> b9ae1c6
🤖 I have created a release *beep* *boop* --- ## [0.32.0](googleapis/mcp-toolbox@v0.31.0...v0.32.0) (2026-04-08) ### ⚠ BREAKING CHANGES * update repo name ([googleapis#2968](googleapis#2968)) ### Features * Add MCP tool annotations to all remaining tools ([googleapis#2221](googleapis#2221)) ([ea09db9](googleapis@ea09db9)) * **bigquery:** Add conversational analytics tools for Data Agents ([googleapis#2517](googleapis#2517)) ([2490a4b](googleapis@2490a4b)) * **embeddingModel:** Add Backend API selection fields ([googleapis#2592](googleapis#2592)) ([912aa9e](googleapis@912aa9e)) * **skills:** Add Claude Code support to generated scripts ([googleapis#2966](googleapis#2966)) ([a1609e1](googleapis@a1609e1)) * **skills:** Add codex user agent ([googleapis#2973](googleapis#2973)) ([070e939](googleapis@070e939)) * **skills:** Tool invocation via npx ([googleapis#2916](googleapis#2916)) ([377dc5b](googleapis@377dc5b)) * **sources/singlestore:** Add ConnectionParams to SingleStore Config ([googleapis#2555](googleapis#2555)) ([73e2a8c](googleapis@73e2a8c)) * **tool/dataplex-lookup-context:** Relax project constraint and enforce location ([googleapis#2952](googleapis#2952)) ([7ebfdf1](googleapis@7ebfdf1)) * **tools/looker:** Looker agent management from MCP ([googleapis#2830](googleapis#2830)) ([649d4ad](googleapis@649d4ad)) * **ui:** Update to use `/mcp` endpoint ([googleapis#2829](googleapis#2829)) ([c3059c2](googleapis@c3059c2)) ### Bug Fixes * **bigquery:** Add impersonateServiceAccount to prebuilt config ([googleapis#2770](googleapis#2770)) ([9c3a748](googleapis@9c3a748)) * **quickstart:** Robust tool lookup and modernize dependencies in Python samples ([googleapis#2863](googleapis#2863)) ([4c0845d](googleapis@4c0845d)) * **skills:** Fix skill generation template ([googleapis#2914](googleapis#2914)) ([a01a15e](googleapis@a01a15e)) * **skills:** Prevent empty strings overriding optional env vars in node scripts ([googleapis#2963](googleapis#2963)) ([c52adeb](googleapis@c52adeb)) * **tests/bigquery:** Implement uuid-based isolation and reliable resource cleanup ([googleapis#2547](googleapis#2547)) ([479d842](googleapis@479d842)) * **tests/Bigtable:** Implement uuid-based isolation and reliable resource cleanup ([googleapis#2880](googleapis#2880)) ([a769f15](googleapis@a769f15)) * Update error for ConvertConfig function ([googleapis#2993](googleapis#2993)) ([62bdabb](googleapis@62bdabb)) ### Code Refactoring * Update repo name ([googleapis#2968](googleapis#2968)) ([3aae809](googleapis@3aae809)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com> b9ae1c6
…pis#2830) ## Description Looker agent management from MCP ## PR Checklist > Thank you for opening a Pull Request! Before submitting your PR, there are a > few things you can do to make sure it goes smoothly: - [x] Make sure you reviewed [CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md) - [x] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/genai-toolbox/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [x] Ensure the tests and linter pass - [x] Code coverage does not decrease (if any source code was changed) - [x] Appropriate docs were updated (if necessary) - [x] Make sure to add `!` if this involve a breaking change 🛠️ Fixes googleapis#2827 --------- Co-authored-by: hiracky16 <h.piiice16@gmail.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> 649d4ad
Description
Looker agent management from MCP
PR Checklist
CONTRIBUTING.md
bug/issue
before writing your code! That way we can discuss the change, evaluate
designs, and agree on the general idea
!if this involve a breaking change🛠️ Fixes #2827